package com.zyl.blog.common.config.anno;

import com.zyl.blog.common.validated.StatusValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * @version v1.0
 * @ProjectName: Personal_Blog
 * @Package: com.zyl.common.config.anno
 * @ClassName: Status
 * @Description:
 * @Author FinalFantasy
 * @Date 2025/3/11-19:11
 */
@Documented
@Constraint(
        validatedBy = {StatusValidator.class}
)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Status {

    String message() default "状态的值只能为0-禁用 1-正常 2-锁定";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
